package com.gjintel.framework.projecttype.service.impl;


import java.util.Iterator;
import java.util.List;
import org.springframework.beans.factory.annotation.Autowired;
import org.springframework.stereotype.Service;
import com.gjintel.framework.projecttype.dao.IProjectTypeDao;
import com.gjintel.framework.projecttype.model.ProjectType;
import com.gjintel.framework.projecttype.service.IProjectTypeService;
import com.gjintel.sdk.base.dao.Page;
import com.gjintel.sdk.base.dao.Sort;
import com.gjintel.sdk.base.service.impl.BaseServiceImpl;

/**
 * @description 项目类别实现接口
 * @author cxj
 */
@Service("projectTypeService")
public class ProjectTypeServiceImpl extends BaseServiceImpl implements IProjectTypeService{

	@Autowired
	private IProjectTypeDao projectTypeDao;
	
	@Override
	public List<ProjectType> findAll() {
		return this.projectTypeDao.findAll();
	}

	@SuppressWarnings("unchecked")
	@Override
	public void findAll(Page page, ProjectType projectType) {
		this.projectTypeDao.findAll(page, projectType);
		ProjectType temp = null;
		Iterator<ProjectType> projectTypeIt = page.getResult().iterator();
		ProjectType mdel = null;
		while (projectTypeIt.hasNext()) {
			temp = projectTypeIt.next();
		}
	}

	@Override
	public void removeData(String deleteIds) throws Exception {
		ProjectType projectType = null;
		for (String id : deleteIds.split(",")) {
			projectType = this.get(ProjectType.class, id);
			this.remove(projectType);
		}
	}

	
}
